package com.ethink.framework.captcha.properties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author zlt
 * @date 2019/1/6
 */
@Setter
@Getter
@ConfigurationProperties(prefix = "ethink.framework.captcha")
public class CaptchaProperties {

    /**
     * 验证码是否开启验证
     */
    private boolean enabled = true;

    /**
     * 图片宽
     */
    private int imageWidth = 82;
    /**
     * 图片高
     */
    private int imageHeight = 32;

    /**
     * 验证码干扰元素个数
     */
    private int imageInterfereCount = 6;

    /**
     * 最大校验次数
     */
    private int maxValidateTimes = 2;

    /**
     * 字符个数
     */
    private int codeCount = 4;

    /**
     * 验证码过期时间
     */
    private int expire = 300;

    /**
     * 基础字符集合，用于随机获取字符串的字符集合
     */
    private String codeBaseStr = "ABCDEFGHJKMNPQRSTWXYabcdefghjkmnpqrstwxy3456789";
}
